Hệ thống quản lý phòng khám trực tuyến bằng PHP

1 <?php
2 define(
'PREPEND_PATH','../');
3 include(
"../defaultLang.php"); //1
4 include(
"../language.php"); //2
5 include(
"../lib.php"); //3
6 //
this is the core file of the appGini
7 include_once(
"../hooks/calendar-functions.php");
8
9 if
(isset($_POST['func']) && !empty($_POST['func'])) {
10     
switch ($_POST['func']) {
11         
case 'getCalender':
12             getCalender($_POST[
'year'], $_POST['month']);
13             exit;
14         
case 'getEvents':
15             getEvents($_POST[
'date']);
16             exit;
17         
default:
18             
break;
19     }
20 }
21
22 include_once(
"../header.php");
23
24 ?>
25 <link type=
"text/css" rel="stylesheet" href="../hooks/resources/calendar.css"/>
26
27
28 <div id=
"calendar_div">
29     <?php
30     
31     
32     
33     
34     echo getCalender();
35     
36     
37     
38     ?>
39     
40     
41     <script type=
"text/javascript">
42         function getCalendar(target_div, year, month) {
43             $j.ajax({
44                 type:
'POST',
45                 url:
'calendar.php',
46                 data:
'func=getCalender&year=' + year + '&month=' + month,
47                 success: function (html) {
48                     $j(
'#' + target_div).html(html);
49                 }
50             });
51         }
52
53         function getEvents(date) {
54             $j.ajax({
55                 type:
'POST',
56                 url:
'calendar.php',
57                 data:
'func=getEvents&date=' + date,
58                 success: function (html) {
59                     $j(
'#event_list').html(html);
60                     $j(
'#event_list').slideDown('slow');
61                 }
62             });
63         }
64
65
66     
67     </script>
68 </div>
69 <?php include_once(
"../footer.php"); // include the footer file
70 ?>


Gõ tìm kiếm nhanh...